// JavaScript Document

(function($) {

    $.fn.Slider = function(options) {
		
		var defaults = {  
			ImagesPath : "media/game/images"
		},
		settings = $.extend({}, defaults, options);

		var BigImage = $(this).find(".slider-image");
		var Thumbs = $(this).find(".slider-thumbs img");
		
		$(document).ready(function() {
			var ImgLink = Thumbs.first().attr("data-href");
			BigImage.html("<img src='" + settings.ImagesPath + "/" + ImgLink + "' />");
			Thumbs.removeClass("active");
			Thumbs.first().addClass("active");
		});
		
		$(".slider-thumbs img").on("click", function() {
			var ImgLink = $(this).attr("data-href");
			BigImage.html("<img src='" + settings.ImagesPath + "/" +  ImgLink + "' />");
			Thumbs.removeClass("active");
			$(this).addClass("active");
		});
		
    }

}(jQuery));



